package me.zhengjie.modules.fund.domain;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import me.zhengjie.base.BaseEntity;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Entity
@Getter
@Setter
@ToString
@Table(name = "stock_net_value")
public class StockNetValue extends BaseEntity implements Serializable {
    @Id
    @Column(name = "id")
    @NotNull(groups = Update.class)
    @ApiModelProperty(value = "ID", hidden = true)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @NotNull
    @ApiModelProperty(value = "净值日期")
    private Date date;

    @NotNull
    @ApiModelProperty(value = "股票编码")
    private String code;

    @NotNull
    @ApiModelProperty(value = "股票名称")
    private String name;

    @ApiModelProperty(value = "开盘价")
    private BigDecimal startValue;

    @ApiModelProperty(value = "最高价")
    private BigDecimal maxValue;

    @ApiModelProperty(value = "最低价")
    private BigDecimal minValue;

    @ApiModelProperty(value = "收盘价")
    private BigDecimal netValue;

    @ApiModelProperty(value = "涨跌额")
    private BigDecimal profitAmount;

    @ApiModelProperty(value = "涨跌幅")
    private BigDecimal profitRate;

    @ApiModelProperty(value = "成交量")
    private Integer confirmNo;

    @ApiModelProperty(value = "成交金额")
    private BigDecimal confirmAmount;
}
